#include <iostream>
#include <string>
#include "ArrayAlgorithm.h"
using namespace std;
class Person {
private:
    string name;
    int age;
public:
    Person(string n = "未知", int a = -1) : name(n), age(a) {}

    Person(const Person& p) {
        this->name = p.name;
        this->age = age;
    }

    //static int i = 1;

    ~Person() {}

    void showInfo() {
        cout << "[姓名：" << this->name << "，年龄：" << this->age << "]" << endl;
    }

    string getName() {
        return this->name;
    }

    void setName(string name) {
        this->name = name;
    }

    int getAge() {
        return this->age;
    }

    void setAge(int age) {
        this->age = age;
    }

    friend bool operator<(const Person& p1, const Person& p2);
    friend bool operator>(const Person& p1, const Person& p2);
};


bool operator<(const Person& p1, const Person& p2) {
    return p1.age < p2.age;
}

bool operator>(const Person& p1, const Person& p2) {
    return p1.age > p2.age;
}

int main() {
    int arr[10] = {234785, 35748, 2367, 264, 7283, 234678, 2367, 2674, 2378, 74835};
    for (int i = 0; i < 10; i++) {
        cout << arr[i] << " ";
    }
    cout << endl;
    bubbleSort(arr, 10);
    for (int i = 0; i < 10; i++) {
        cout << arr[i] << " ";
    }
    cout << endl;
}